import request from '@/utils/request'

// 查询编码规则段配置列表
export function listSegment(query) {
  return request({
    url: '/system/segment/list',
    method: 'get',
    params: query
  })
}

// 查询编码规则段配置详细
export function getSegment(segmentId) {
  return request({
    url: '/system/segment/' + segmentId,
    method: 'get'
  })
}

// 新增编码规则段配置
export function addSegment(data) {
  return request({
    url: '/system/segment',
    method: 'post',
    data: data
  })
}

// 修改编码规则段配置
export function updateSegment(data) {
  return request({
    url: '/system/segment',
    method: 'put',
    data: data
  })
}

// 删除编码规则段配置
export function delSegment(segmentId) {
  return request({
    url: '/system/segment/' + segmentId,
    method: 'delete'
  })
}
